<?php $form=$this->beginWidget('bootstrap.widgets.TbActiveForm',array(
	'id'=>'audios-form',
	'enableAjaxValidation'=>false,
	'htmlOptions' => array(
			'enctype' => 'multipart/form-data'
	)
)); ?>

	<p class="help-block">Fields with <span class="required">*</span> are required.</p>

	<?php echo $form->errorSummary($model); ?>

	
	<div class="row">
		<?php echo $form->labelEx($model,'audio_name'); ?>
		<?php echo $form->textField($model,'audio_name'); ?>	
		<?php echo $form->error($model,'audio_name'); ?>
	</div>
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'audio_file'); ?>
		<?php echo $form->fileField($model,'audio_file'); ?>	
		<?php echo $form->error($model,'audio_file'); ?>
	</div>
	
	<div class="row">
		<?php echo $form->labelEx($model,'audio_cover'); ?>
		<?php echo $form->fileField($model,'audio_cover'); ?>	
		<?php echo $form->error($model,'audio_cover'); ?>
	</div>
	
	
	<div class="row">
		<?php echo $form->labelEx($model,'audio_tags'); ?>
		<?php $this->widget('CAutoComplete', array(
			'model'=>$model,
			'attribute'=>'audio_tags',
			'url'=>array('/educators/audios/suggestTags'),
			'multiple'=>true,
			'htmlOptions'=>array('size'=>50,'class'=>'span5'),
		)); ?>
		<p class="hint">请使用逗号分隔标签</p>
		<?php echo $form->error($model,'tags'); ?>
	</div>
	
	<?php if(0):?>
	<?php echo $form->textFieldRow($model,'ablum_id',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'audio_file',array('class'=>'span5','maxlength'=>255)); ?>

	<?php echo $form->textFieldRow($model,'audio_size',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'audio_length',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'audio_from',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'audio_playtimes',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'audio_likes',array('class'=>'span5')); ?>

	<?php echo $form->textFieldRow($model,'audio_status',array('class'=>'span5','maxlength'=>1)); ?>

	<?php echo $form->textFieldRow($model,'audio_dateline',array('class'=>'span5')); ?>
	
	<?php endif;?>

	<div class="form-actions row">
		<?php $this->widget('bootstrap.widgets.TbButton', array(
			'buttonType'=>'submit',
			'type'=>'primary',
			'label'=>$model->isNewRecord ? 'Create' : 'Save',
		)); ?>
	</div>

<?php $this->endWidget(); ?>
